CC = gcc
CFLAG = -Wall -O3
CINCLUDE = -I./ 
CLIB = -lpthread
CFLAGS = $(CFLAG) $(CINCLUDE) 

SRC1 = read_fifo.c
TAGS1 = read_fifo

SRC2 = write_fifo.c
TAGS2 = write_fifo

all:$(TAGS1) $(TAGS2)

.PHONY:read
read:$(TAGS1)

$(TAGS1): $(SRC1) $(HEAD) Makefile
	$(CC) $(CFLAGS) -o $(TAGS1) $(SRC1) $(CLIB)

.PHONY:write
write:$(TAGS2)

$(TAGS2): $(SRC2) $(HEAD) Makefile
	$(CC) $(CFLAGS) -o $(TAGS2) $(SRC2) $(CLIB)

clean:
	rm -f *.o $(TAGS1) $(TAGS2)

